package mybatis;
import com.yyge.entity._____;
import com.yyge.service._____Service;
import com.yyge.service.impl._____ServiceImpl;
import com.yyge.vo.PageVo;
import com.yyge.vo.R;
import com.yyge.config.SpringConfig;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;

import javax.annotation.Resource;
import java.util.List;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = {SpringConfig.class})
@WebAppConfiguration // 在spring mvc中做单元测试要加的注解
public class _____Test {

    @Resource(type = _____Service.class)
    private _____ServiceImpl service;

    @Test
    public void selectAll(){
        R r =service.selectAll(new _____());
        PageVo pageVo=(PageVo) r.getData();
        List<_____> list = (List<_____>)pageVo.getData();
        list.forEach(System.out::println);
    }

    @Login
}


